package pro.softzhang.algo.lc2000;

public class LC2011_FinalValueOfVariableAfterPerformingOperations {
    public static void main(String[] args) {

    }

    /**
     *
     */
    static
    class Solution {
        public int finalValueAfterOperations(String[] operations) {
            int X = 0;
            for (String op : operations) {
                if (op.startsWith("++") || op.endsWith("++"))
                    X++;
                else X--;
            }
            return X;
        }
    }
}
